<?php
if ( ! Route::cache())
{
// FRONTEND

Route::set('search', 'search')
	->defaults(array(
	'controller' => 'cms_show',
	'action' => 'search'
	));
Route::set('page', 'page(/<id>)')
	->defaults(array(
	'controller' => 'cms_show',
	'action' => 'showpage'
	));
/*Route::set('kontakt', 'kontakt')
	->defaults(array(
	'controller' => 'cms_show',
	'action' => 'showpage',
	'id' => 12
	));*/
// BACKEND
Route::set('admin/settings', 'admin/settings')
	->defaults(array(
	'controller' => 'cms_admin',
	'action' => 'settings'
	));
Route::set('login', 'login')
	->defaults(array(
	'controller' => 'cms_login',
	'action' => 'login'
	));
Route::set('logout', 'logout')
	->defaults(array(
	'controller' => 'cms_login',
	'action' => 'logout'
	));
Route::set('admin', 'admin')
	->defaults(array(
	'controller' => 'cms_admin',
	'action' => 'start'
	));
/* CMS */
Route::set('uploadify', 'uploadify(/<id>)')
	->defaults(array(
		'controller' => 'cms_uploadify',
		'action'=>'uploadify',
	));
Route::set('admin/pages', 'admin/pages(/<id>)')
	->defaults(array(
		'controller' => 'cms_pages',
		'action'=>'pagelist',
	));
Route::set('admin/addpage', 'admin/addpage(/<id>)(/<cat>)')
	->defaults(array(
	'controller' => 'cms_pages',
	'action' => 'addpage'
	));
Route::set('admin/delpage', 'admin/delpage(/<id>)')
	->defaults(array(
	'controller' => 'cms_pages',
	'action' => 'delpage'
	));
Route::set('admin/delthumb', 'admin/delthumb(/<id>)')
	->defaults(array(
		'controller' => 'cms_pages',
		'action'=>'delthumb',
	));
Route::set('admin/banners', 'admin/banners')
	->defaults(array(
		'controller' => 'cms_banners',
		'action'=>'bannerlist',
	));
Route::set('admin/banneredit', 'admin/banneredit(/<id>)')
	->defaults(array(
		'controller' => 'cms_banners',
		'action'=>'banneredit',
	));
Route::set('admin/delbanner', 'admin/delbanner(/<id>)')
	->defaults(array(
		'controller' => 'cms_banners',
		'action'=>'delbanner',
	));
Route::set('admin/bannerorder', 'admin/bannerorder')
	->defaults(array(
		'controller' => 'cms_banners',
		'action'=>'bannerorder',
	));
Route::set('admin/changebannerurl', 'admin/changebannerurl')
	->defaults(array(
		'controller' => 'cms_banners',
		'action'=>'changebannerurl',
	));
Route::set('admin/changerotation', 'admin/changerotation')
	->defaults(array(
		'controller' => 'cms_banners',
		'action'=>'changerotation',
	));
Route::set('admin/search', 'admin/search')
	->defaults(array(
		'controller' => 'cms_admin',
		'action'=>'search',
	));
/* Użytkownicy */
Route::set('admin/edituser', 'admin/edituser(/<id>)')
	->defaults(array(
		'controller' => 'cms_users',
		'action'=>'edituser'
	));
Route::set('admin/my-account', 'admin/my-account')
	->defaults(array(
	'controller' => 'cms_users',
	'action' => 'edituser',
	'id' => 'my'
	));
Route::set('admin/checkmail', 'admin/checkmail') // ajax - z validate_register.js
	->defaults(array(
	'controller' => 'cms_users',
	'action' => 'checkmail',
	));
}
?>